import heapq
scores=[1,2,3,4,5,6,7,8,9,100,99]
print(heapq.nlargest(3,scores))
print(heapq.nsmallest(3,scores))